A virtual machine is a software implementation of a physical machine. Instead of directly interacting with physical hardware of a physical computer system, a layer of virtualizing software (typically called a hypervisor or virtual machine monitor) is installed on a computer system and this software controls how virtual machines interact with the physical hardware by time-slicing the physical hardware and emulating the presence of physical hardware within the virtual machines.
One hardware resource that a hypervisor time-slices is a physical processor. Generally, a physical processor is exposed within a virtual machine as a virtual processor. A guest operating system can run a workload on the virtual processor by scheduling a thread on the virtual processor and a hypervisor scheduler can execute and schedule a thread that represents the virtual processor on a physical processor. Next, the thread indicative of the workload runs and some, hopefully useful, work is performed. The hypervisor scheduler may then run another thread on the same, or a different physical processor. Thus, the hypervisor scheduler determines both when and where to schedule a particular virtual processor.
For the most part, the amount of power consumed by the physical machine is dependent on the number of physical processors within the physical machine. Since processors consume large amounts of power and every processor in a computer system may not be needed to execute a given workload, physical processors can be placed in an idle state and/or processor speed can be reduced. When a processor is inactive or “parked” it does not use much power. Consequently, the overall amount of power consumed by the computer system is reduced.